package com.kob.mysql.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.kob.mysql.entity.User;
import com.kob.mysql.mapper.CrudMapper;
import com.kob.mysql.result.R;
import com.kob.mysql.service.CrudService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class CrudServiceImpl extends ServiceImpl<CrudMapper, User> implements CrudService {
    @Autowired
    private CrudMapper crudMapper;
    @Override
    public R getList() {
        List<User> userList = crudMapper.selectList(null);
        return R.Success(userList.toString());
    }
    @Override
    public R deleteById(Integer id) {
        return null;
    }

    @Override
    public R addOne(User user) {
        return null;
    }

    @Override
    public R updateOneById(User user) {
        return null;
    }
}
